//
//  CTUserPublishCollectionCell.m
//  ConstellationTalk_0.1
//
//  Created by 韩威 on 15/5/25.
//  Copyright (c) 2015年 riley chu. All rights reserved.
//

#import "CTUserPublishCollectionCell.h"
#import "CTDebugManager.h"
#import "CTAppLanguage.h"
#import "CTRequestUtil.h"

@interface CTUserPublishCollectionCell ()
{
    UIImageView * picImageView;
//    UILabel * nameLabel;
//    
//    UILabel * trendsLabel;
//    UILabel * originLabel;
//    UILabel * describeLabel;
//    
//    UIImageView * trendsImageView;
//    UIImageView * originImageView;
//    UIImageView * describeImageView;
}

@end

@implementation CTUserPublishCollectionCell
- (void)dealloc
{
    [picImageView removeFromSuperview];
    picImageView = nil;
    self.imgUrl = nil;
    [CTDebugManager showDebugLogInfo:@"dealloc : CTUserPublishCollectionCell Is Removed!!!"];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor blueColor];
        picImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
        picImageView.backgroundColor = [UIColor redColor];
        [self addSubview:picImageView];
    }
    return self;
}


#pragma mark - setter -

-(void)setImgUrl:(NSString *)imgUrl
{
    [CTRequestUtil requestImgWithUrl:imgUrl withCompletionSuccessHandler:^(UIImage *img) {
        picImageView.image = img;
    } withFailedHandler:^(NSError *error) {
        
    }];
}


@end
